#ifndef UDP_SENDER_INCLUDED
#define UDP_SENDER_INCLUDED

#include <netinet/in.h>
#include <boost/smart_ptr/shared_ptr.hpp>
#include "com.pb.h"
#include "server.h"

class udp_sender {
public:
	udp_sender(int port, const char *ip);
	void send(com::Block const& flowPacket);

private:
	int m_sockfd,m_n;
	struct sockaddr_in m_servaddr,m_cliaddr;
	pthread_mutex_t m_lock;
};


//typedef boost::shared_ptr<socketTCP*> UDPSenderPointer;
typedef socketTCP* UDPSenderPointer;

#endif
